#!/bin/sh
###
# fpp-redirect-helper:
#
# Consumes first argument and redirects output to. Uses the remaining arguments as what to run to capture that output.
# $1: file capturing stdout
# $2-: run as a command line, which generates stdout
###
OUT_FILE="$1"
shift
EXECUTABLE="$1"
shift
"$EXECUTABLE" "$@" > "${OUT_FILE}"
